<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: register.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."register.php";
include LOCALE.LOCALESET."user_fields.php";

$avloserid=$_GET['avloserid'];
$sau_foring=$_POST['sau_foring'];
$sau_sanking=$_POST['sau_sanking'];
$sau_lamming=$_POST['sau_lamming'];
$storfe_foring=$_POST['storfe_foring'];
$storfe_melking=$_POST['storfe_melking'];
$storfe_kalving=$_POST['storfe_kalving'];
$gris=$_POST['gris'];
$fjerfe=$_POST['fjerfe'];
$traktor_enkel=$_POST['traktor_enkel'];
$traktor_allsidig=$_POST['traktor_allsidig'];
$motorsag=$_POST['motorsag'];
$melkerobot=$_POST['melkerobot'];
$gjerding=$_POST['gjerding'];
$fjervask=$_POST['fjervask'];

$sau_foring_egen=$_POST['sau_foring_egen'];
$sau_sanking_egen=$_POST['sau_sanking_egen'];
$sau_lamming_egen=$_POST['sau_lamming_egen'];
$storfe_foring_egen=$_POST['storfe_foring_egen'];
$storfe_melking_egen=$_POST['storfe_melking_egen'];
$storfe_kalving_egen=$_POST['storfe_kalving_egen'];
$gris_egen=$_POST['gris_egen'];
$fjerfe_egen=$_POST['fjerfe_egen'];
$traktor_enkel_egen=$_POST['traktor_enkel_egen'];
$traktor_allsidig_egen=$_POST['traktor_allsidig_egen'];
$motorsag_egen=$_POST['motorsag_egen'];
$melkerobot_egen=$_POST['melkerobot_egen'];
$gjerding_egen=$_POST['gjerding_egen'];
$fjervask_egen=$_POST['fjervask_egen'];

	$db = mysql_connect($GLOBALS['db_host'], $GLOBALS['db_user'], $GLOBALS['db_password']);
	mysql_select_db($GLOBALS['db_name'], $db);  

	$query = "INSERT INTO egenvurdering VALUES ( '', $avloserid,'$sau_foring', '$sau_sanking', 
			'$sau_lamming', '$storfe_foring','$storfe_melking', '$storfe_kalving','$gris', '$fjerfe', '$traktor_enkel', '$traktor_allsidig', 
			'$motorsag', '$melkerobot', '$gjerding', '$fjervask', '$sau_foring_egen', '$sau_sanking_egen', '$sau_lamming_egen', '$storfe_foring_egen', 
			'$storfe_melking_egen', '$storfe_kalving_egen', '$gris_egen', '$fjerfe_egen', '$traktor_enkel_egen', '$traktor_allsidig_egen', '$motorsag_egen',
			'$melkerobot_egen', '$gjerding_egen', '$fjervask_egen')";
	mysql_query($query);	

opentable($locale['401']);

echo $locale['global_107'];
closetable();

header("Refresh: 1; url='profil.php?avloserid=$avloserid'");

require_once THEMES."templates/footer.php";
?>
